<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: Upstart::Exporter::Options::Global
  
    &mdash; Documentation by YARD 0.7.4
  
</title>

  <link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '../../..';
  if (relpath != '') relpath += '/';
</script>

  <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>


  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="../../../_index.html">Index (G)</a> &raquo; 
    <span class='title'><span class='object_link'><a href="../../../Upstart.html" title="Upstart (module)">Upstart</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Exporter.html" title="Upstart::Exporter (class)">Exporter</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Options.html" title="Upstart::Exporter::Options (module)">Options</a></span></span>
     &raquo; 
    <span class="title">Global</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a id="class_list_link" href="#">Class List</a>
  
    <a id="method_list_link" href="#">Method List</a>
  
    <a id="file_list_link" href="#">File List</a>
  
</div>
      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Upstart::Exporter::Options::Global
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Hash</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">Hash</li>
          
            <li class="next">Upstart::Exporter::Options::Global</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
      <dt class="r2">Includes:</dt>
      <dd class="r2"><span class='object_link'><a href="../Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span></dd>
      
    
  
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">lib/upstart-exporter/options/global.rb</dd>
  
</dl>
<div class="clear"></div>


  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="DEFAULTS-constant" class="">DEFAULTS =
          
        </dt>
        <dd><pre class="code"><span class='lbrace token'>{</span>
  <span class='string val'>'helper_dir'</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'/var/local/upstart_helpers/'</span><span class='comma token'>,</span>
  <span class='string val'>'upstart_dir'</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'/etc/init/'</span><span class='comma token'>,</span>
  <span class='string val'>'run_user'</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'service'</span><span class='comma token'>,</span>
  <span class='string val'>'prefix'</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'fb-'</span>
<span class='rbrace token'>}</span>
</pre></dd>
      
        <dt id="CONF-constant" class="">CONF =
          
        </dt>
        <dd><pre class="code"><span class='string val'>'/etc/upstart-exporter.yaml'</span>
</pre></dd>
      
    </dl>
  


  
  
  
  
  


  
  
  
  

  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (Global) <strong>initialize</strong> </a>
    

    
  </span>
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
A new instance of Global.
</p>
</div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  <h3 class="inherited">Methods included from <span class='object_link'><a href="../Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="../Errors.html#error-instance_method" title="Upstart::Exporter::Errors#error (method)">#error</a></span></p>

  <div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <p class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="Upstart::Exporter::Options::Global (class)">Global</a></span></tt>) <strong>initialize</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
A new instance of Global
</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/upstart-exporter/options/global.rb', line 14</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span>
  <span class='rubyid_super super kw'>super</span>
  <span class='rubyid_config identifier id'>config</span> <span class='assign token'>=</span> <span class='rubyid_if if kw'>if</span> <span class='rubyid_FileTest constant id'>FileTest</span><span class='dot token'>.</span><span class='rubyid_file? fid id'>file?</span><span class='lparen token'>(</span><span class='rubyid_CONF constant id'>CONF</span><span class='rparen token'>)</span>
    <span class='rubyid_YAML constant id'>YAML</span><span class='colon2 op'>::</span><span class='rubyid_load identifier id'>load</span><span class='lparen token'>(</span><span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_read identifier id'>read</span><span class='lparen token'>(</span><span class='rubyid_CONF constant id'>CONF</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
  <span class='rubyid_else else kw'>else</span>
    <span class='rubyid_$stderr gvar id'>$stderr</span><span class='dot token'>.</span><span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>&quot;#{CONF} not found&quot;</span>
    <span class='lbrace token'>{</span><span class='rbrace token'>}</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_error identifier id'>error</span> <span class='dstring node'>&quot;#{CONF} is not a valid YAML config&quot;</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_Hash constant id'>Hash</span><span class='rparen token'>)</span>
  <span class='dstring node'>%w{helper_dir upstart_dir run_user prefix}</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_param identifier id'>param</span><span class='bitor op'>|</span>
    <span class='rubyid_value identifier id'>value</span> <span class='assign token'>=</span> <span class='rubyid_if if kw'>if</span> <span class='rubyid_config identifier id'>config</span><span class='lbrack token'>[</span><span class='rubyid_param identifier id'>param</span><span class='rbrack token'>]</span>
      <span class='rubyid_config identifier id'>config</span><span class='lbrack token'>[</span><span class='rubyid_param identifier id'>param</span><span class='rbrack token'>]</span>
    <span class='rubyid_else else kw'>else</span>
      <span class='rubyid_$stderr gvar id'>$stderr</span><span class='dot token'>.</span><span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>&quot;Param #{param} is not set, taking default value #{DEFAULTS[param]}&quot;</span>
      <span class='rubyid_DEFAULTS constant id'>DEFAULTS</span><span class='lbrack token'>[</span><span class='rubyid_param identifier id'>param</span><span class='rbrack token'>]</span>
    <span class='rubyid_end end kw'>end</span>
    <span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='rubyid_param identifier id'>param</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_value identifier id'>value</span>
  <span class='rubyid_end end kw'>end</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
  
</div>


</div>
    
    <div id="footer">
  Generated on Thu Dec 22 20:43:31 2011 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.7.4 (ruby-1.8.7).
</div>

  </body>
</html>